package com.service.aliyun;

import java.util.Map;

import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;

/**
 * @author geliyang
 *
 */
public interface ICdnService {
	
	/**
	 * 
	 * @param objectPath 文件在oss上地址  如：test.txt,  testFolder/test.txt
	 * @return int >=200且<300 表示API调用成功.
	 * 				>=300且<500 SDK抛ClientException, 表示客户端错误.
	 * 				>=500 SDK抛ServerException, 表示服务器端错误.
	 * @throws ServerException
	 * @throws ClientException
	 */
	public int refreshObjectOfCdn(String objectPath) throws ServerException, ClientException;
	
	/**
	 * 刷新cdn,返回map
	 * @param objectPath 文件在oss上地址  如：test.txt,  testFolder/test.txt
	 * @return map <key：refreshTaskId,requestId>
	 * @throws ServerException
	 * @throws ClientException
	 */
	public Map<String,Object> refreshObjectOfCdnForMap(String objectPath) throws ServerException, ClientException;

}
